from django.db import models
from django.contrib.auth.models import User,Group
from django.contrib import admin

class Ad(models.Model):
    text = models.TextField()
    created = models.DateTimeField(auto_now_add=True)
    user = models.ForeignKey(User, null=True, blank=True)
    def __unicode__(self):
        return self.text[:40]
    def __str__(self): return unicode(self)

try:
  admin.site.register(Ad)
except admin.sites.AlreadyRegistered:
  pass

